var app = getApp();
Page({
    data: {},
    onLoad: function () {
    },
    onShow: function () {
        this.setData({
            userInfo: app.globalData.userInfo
        });
    },
    onGetInfo: function () {
        app.getUserInfo()
    },
    onCall: function () {
        console.log('aaa');
        wx.makePhoneCall({
            phoneNumber: '010-61773299'
        })
    },
    onAddress: function () {
        wx.chooseAddress({
            success: function (res) {
                console.log(res.userName)
                console.log(res.postalCode)
                console.log(res.provinceName)
                console.log(res.cityName)
                console.log(res.countyName)
                console.log(res.detailInfo)
                console.log(res.nationalCode)
                console.log(res.telNumber)
            }
        })
    },
    goAddress: function () {
        wx.navigateTo({ url: '/page/address/address' });
    },
    goOrder: function () {
        wx.navigateTo({ url: '/page/order/order' });
    },
    helpAndadvice: function () {
        wx.navigateTo({ url: '/page/help/help?before=0' });
    },
    onPullDownRefresh: function () {
        this.onShow();
        wx.stopPullDownRefresh()
    }
});

